home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_500 / wiconify / wiconify-source.lzh / Source / wSetup.h < prev    next >
C/C++ Source or Header  |  1991-04-19  |  4KB  |  108 lines

  1. /*
  2.  *  WICONIFY    A utility that allows you to iconify any Intuition window
  3.  *              on any screen, and to open WB windows on any screen.
  4.  *
  5.  *  wSetup.h    Include file for structures used to commmunicate
  6.  *              between the loader and handler.
  7.  *
  8.  *  Copyright 1990 by Davide P. Cervone, all rights reserved.
  9.  *  You may use this code, provided this copyright notice is kept intact.
  10.  */
  11.  
  12. #include <libraries/dos.h>
  13.  
  14. #define PORTNAME        WICONPORT
  15.  
  16. #define OKSIGNAL        SIGBREAKF_CTRL_E
  17. #define CANCELSIGNAL    SIGBREAKF_CTRL_C
  18.  
  19.  
  20. /*
  21.  *  HandlerData is the structure used to pass information between
  22.  *  the handler when it is loaded and the loader.  It includes
  23.  *  pointers to variables that the loader must initialize, and 
  24.  *  values of variables that the loader may need to use during the
  25.  *  initialization process.
  26.  */
  27.  
  28. struct HandlerData
  29. {
  30.    short  MajVers,MinVers;                  /* Handler version numbers */
  31.    long   Segment;                          /* The loaded handler segments */
  32.    APTR   ParentTask;                       /* The loader Process */
  33.  
  34.    struct IntuitionBase **IntuitionBase;    /* Libraries that must be openned */
  35.    struct GfxBase       **GfxBase;
  36.    struct LayersBase    **LayersBase;
  37.    struct SysBase       **SysBase;
  38.    struct DOSBase       **DOSBase;
  39.  
  40.    struct Interrupt *Handler_Interrupt;     /* The Input Device handler */
  41.    struct Menu *wMenu;                      /* The menus (for initialization) */
  42.    struct wMenuItem *OpenWindowMenu;        /* The OpenOn submenu */
  43.    struct Image *DefaultIcon;               /* The default icon image */
  44.    struct Image *DefaultScreenIcon;         /* The default screen icon image */
  45.    
  46.    char **HiResCLICommand;                  /* The HIRES NewCLI command */
  47.    char **LoResCLICommand;                  /* The LOWRES NewCLI command */
  48.    long *StackSize;                         /* The NewCLI stack size */
  49.    struct Image **DefaultImage;             /* Image for icons without one */
  50.    struct Image **DefaultSelect;            /* Default select image */
  51.    struct Image **DefaultMask;              /* Default image mask */
  52.    struct Image **DefaultScreenImage;       /* Image for screens without one */
  53.    struct Image **DefaultScreenSelect;      /* Default screen select image */
  54.    struct Image **DefaultScreenMask;        /* Default screen image mask */
  55.    ULONG *DefaultFlags;                     /* Default icon flags */
  56.    ULONG *DefaultScreenFlags;               /* Default screen icon flags */
  57.    struct Ignore **IgnoreScreen;            /* List of screens to ignore */
  58.    UBYTE *IconifyKey,*ActivateKey;          /* Keys and qualifiers */
  59.    UWORD *IconifyQuals,*IconifyDisquals,*IconifyChange;
  60.    UWORD *ActivateQuals;
  61.    UWORD *Colors;                           /* default color map for screens */
  62.    
  63.                                             /* Routines to be trapped */
  64.    void (*cOpenScreen)();
  65.    void (*CleanUp)();
  66.  
  67.    void (*aOpenWindow)();
  68.    long *OldOpenWindow;
  69.  
  70.    void (*aCloseWindow)();
  71.    long *OldCloseWindow;
  72.  
  73.    void (*aOpenScreen)();
  74.    long *OldOpenScreen;
  75.  
  76.    void (*aCloseScreen)();
  77.    long *OldCloseScreen;
  78.  
  79.    void (*aSetWindowTitles)();
  80.    long *OldSetWindowTitles;
  81.  
  82.    void (*aWindowToFront)();
  83.    long *OldWindowToFront;
  84.  
  85.    void (*aWindowToBack)();
  86.    long *OldWindowToBack;
  87.  
  88.    void (*aActivateWindow)();
  89.    long *OldActivateWindow;
  90.  
  91.    void (*aBuildSysRequest)();
  92.    long *OldBuildSysRequest;
  93.  
  94.    void (*aFreeSysRequest)();
  95.    long *OldFreeSysRequest;
  96.  
  97.    void (*aAutoRequest)();
  98.    long *OldAutoRequest;
  99. };
  100.  
  101.  
  102. /*
  103.  *  Macros to make using HandlerData easy
  104.  */
  105.  
  106. #define VAR(x)      (*(HandlerData->x))
  107. #define var(x)      (HandlerData->x)
  108.